import request from '/@/utils/request';

export function getDeptList(query?: Object) {
    return request({
        url: '/supplier/manager/list',
        method: 'get',
        params: query
    })
}


export function addDept(data: object) {
    return request({
        url: '/supplier/manager/add',
        method: 'post',
        data: data
    })
}
export function create(data: object) {
    return request({
        url: '/supplier/manager/create',
        method: 'post',
        data: data
    })
}


export function editDept(data: object) {
    return request({
        url: '/supplier/manager/edit',
        method: 'put',
        data: data
    })
}


export function deleteDept(id: number) {
    return request({
        url: '/supplier/manager/delete',
        method: 'delete',
        data: {id}
    })
}

// 查询模板管理详细
export function getTemplate(id: any) {
    return request({
        url: '/supplier/info/ba001/' + id,
        method: 'get',
    })
}/// 查询模板管理详细
export function UpDate(table: any, id: any, data: any, step: any) {
    return request({
        url: '/supplier/data/' + table + '/' + id + '/' + step,
        method: 'put',
        data: data
    })
}// 查询模板管理详细
export function UpStatus( id :any, status: any) {
    return request({
        url: '/supplier/upstatus/'  + id ,
        method: 'put',
        data: {status:status}
    })
}

export function getFieldsinfo(id:any) {
    return request({
        url: '/source/getfieldinfo',
        method: 'get',
        params: {id:id}
    })
}
